-- GENERATED SPELL FOR [Iron Sludge] --


function spell0_28165(pUnit, Event) --@Toxic Volley,n/a--
pUnit:FullCastSpellOnTarget(50838,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28165', 680, 1)
end

function spell1_28165(pUnit, Event) --@Toxic Volley,n/a--
pUnit:FullCastSpellOnTarget(59853,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28165', 595, 1)
end

function Sorts_28165(pUnit, Event)
local choix_sorts_28165 = math.random(0, 1)
if choix_sorts_28165 == 0 then
pUnit:RegisterEvent('spell0_28165', 1, 1)
end
if choix_sorts_28165 == 1 then
pUnit:RegisterEvent('spell1_28165', 1, 1)
end
end

function mob28165_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28165', math.random(1500, 3000), 1)
end

function mob28165_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28165_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28165_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28165, 1, 'mob28165_Action')
RegisterUnitEvent(28165, 2, 'mob28165_Leave')
RegisterUnitEvent(28165, 3, 'mob28165_Kill')
RegisterUnitEvent(28165, 4, 'mob28165_Die')
